package com.cory.admin.sys.domain.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 
 * </p>
 *
 * @author xc
 * @since 2019-03-18
 */
@Data
public class SysLoginLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 租户id
     */
    private Integer tenantId;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 登录名
     */
    private String loginName;

    /**
     * 用户类型
     */
    private Integer userType;

    /**
     * 登录时间
     */
    private LocalDateTime loginTime;

    /**
     * 退出时间
     */
    private LocalDateTime logoutTime;

    /**
     * 登录ip
     */
    private String loginIp;

    /**
     * 登录备注
     */
    private String loginRemarks;

    /**
     * 退出备注
     */
    private String logoutRemarks;
    
    /**
     * 登录的token
     */
    private String token;
    
    /**
     * 会话session id
     */
    private String sessionId;
    
    /**
     * 登录状态 1：登录中，2：已退出
     */
    private Integer status;

    @Override
    public String toString() {
        return "SysLoginLog{" +
        "id=" + id +
        ", userId=" + userId +
        ", loginName=" + loginName +
        ", userType=" + userType +
        ", loginTime=" + loginTime +
        ", logoutTime=" + logoutTime +
        ", loginIp=" + loginIp +
        ", loginRemarks=" + loginRemarks +
        ", logoutRemarks=" + logoutRemarks +
        "}";
    }
}
